#include <REGX52.H>
#include "Delay.h"
#include "MatrixLED.h"

unsigned char Animation[]={
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0xFF,0x10,0x10,0x10,0xFF,0x00,0x0E,0x15,0x15,0x15,0x0C,0x00,0x7E,0x01,0x02,0x00,
	0x7E,0x01,0x02,0x00,0x0E,0x11,0x11,0x0E,0x00,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};

void main()
{
	unsigned char i,Offset=3,count=0;
	MatrixLED_Init();
	while(1)
	{
		for(i=0; i<8; i++)
		{
			MatrixLED_ShowColumn(i,Animation[i+Offset]);
		}
		count++;
		if(count>10)
		{
			count=0;
			Offset++;
			if(Offset>40)Offset=0;
		}
	}
}